package duck;

import java.util.Observable;

public class ObservedQuack extends Observable implements Quackable {

	private Quackable quackable;

	public ObservedQuack(Quackable quackable) {
		this.quackable = quackable;
		//this.observer = Quackologist.getInstance();
		
		//super.addObserver(observer);
	}

	@Override
	public void quack() {
		quackable.quack();
		super.setChanged();
		super.notifyObservers();
	}

	public Quackable getQuackable() {
		return quackable;
	}

}
